package com.wang.todoList.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wang.todoList.VO.PageInfo;
import com.wang.todoList.entity.TodoInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zifan
 * @since 2021-07-24
 */
public interface TodoInfoService extends IService<TodoInfo> {

    /**
     * 获取用户下所有的id
     * @return
     */
    Map<String,Object> getTodos(HttpServletRequest request, PageInfo pageInfo);

    /**
     * 新增一条数据
     * @param request
     * @param todoInfo
     * @return
     */
    Map<String, Object> addTodos(HttpServletRequest request, TodoInfo todoInfo);

    /**
     * 修改todo的状态
     * @param todoInfo
     * @return
     */
    Map<String, Object> updateTodosStatus(TodoInfo todoInfo);

    /**
     * 修改todo的内容
     * @param todoInfo
     * @return
     */
    Map<String, Object> updateTodoContent(TodoInfo todoInfo);

    /**
     * 删除所有已取消
     */
    Map<String, Object> deleteAllCancel(HttpServletRequest request);
}
